package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PERFIL_CUENTA database table.
 * 
 */
@Embeddable
public class PerfilCuentaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long cuentaId;
	private long perfilId;

    public PerfilCuentaPK() {
    }

	@Column(name="CUENTA_ID", unique=true, nullable=false)
	public long getCuentaId() {
		return this.cuentaId;
	}
	public void setCuentaId(long cuentaId) {
		this.cuentaId = cuentaId;
	}

	@Column(name="PERFIL_ID", unique=true, nullable=false)
	public long getPerfilId() {
		return this.perfilId;
	}
	public void setPerfilId(long perfilId) {
		this.perfilId = perfilId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PerfilCuentaPK)) {
			return false;
		}
		PerfilCuentaPK castOther = (PerfilCuentaPK)other;
		return 
			(this.cuentaId == castOther.cuentaId)
			&& (this.perfilId == castOther.perfilId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.cuentaId ^ (this.cuentaId >>> 32)));
		hash = hash * prime + ((int) (this.perfilId ^ (this.perfilId >>> 32)));
		
		return hash;
    }
}